<template>
    <div>
        <h1>首页</h1>
        {{fileMsg}}
        <el-button @click="runTest">Test</el-button>
    </div>
</template>

<script>
    import fs from 'fs';
    import {remote} from 'electron';

    export default {
        name: "IndexPage",
        data() {
            return {
                fileMsg: ''
            }
        },
        methods: {
            runTest() {
                fs.readFile('/Users/zinc/dev/projects/coc_searcher/README.md', 'utf-8', (err, data) => {
                    this.fileMsg = data;
                })
            }
        }
    }
</script>

<style scoped>

</style>
